//Situation.h
/*Header file for Situation class, which represents the players in the current game space
Created by: Taryn Green & Chris Groce
Updated: 10/10/2013
*/

#ifndef SITUATION_H
#define SITUATION_H


#include "Room.h"
#include "Player.h"
#include "Drone.h"
#include "Shot.h"
#include <vector>


using namespace std;

class Situation
{
public:
	Situation();
	Player getPlayer();
	void turnPlayerLeft();
	void turnPlayerRight();
	void turnPlayerDown();
	void turnPlayerUp();
	void advancePlayerLeft();
	void advancePlayerRight();
	void advancePlayerForward();
	void advancePlayerBackward();
	void advancePlayerUp();
	void advancePlayerDown();
	void updatePlayerPositions();
	void resetPlayerSpeeds();
	Player getOpponent();
	void setOpponent(Player);
	Room getRoom();
	void setPlayer(Player);
	void setRoom(Room);
	// Functions to interacte with Shot class
	Drone getDrone(int);
	void setDrone(Drone, int);
	int getSwarmSize();
	// Functions to interacte with Shot class
	void advanceShots();
	int getNumShots();
	Shot getShot(int);
	// Order of Events:
	// 1) User presses the space bar
	// 2) SituationController::fire() is called
	// 3) Situation::shoot() is called
	// 4) Post Condition: Adds new Shot object to bullets
	void shoot();
	int detectCollision(Shot, Drone);

private:
	//For Serialization
	friend class boost::serialization::access;
	template <class Archive>
	void serialize(Archive &ar, const unsigned int &version) 
	{
		ar & player;
		ar & opponent;
		ar & room;
		ar & swarm;
		ar & bullets;
	}
	Player player;
	Player opponent;
	Room room;
	std::vector<Drone> swarm;
	std::vector<Shot> bullets;
};

#endif

